package o;

import com.google.android.exoplayer2.extractor.mp4.Track;

public final class afi {
    public final long[] ʻ;
    public final int[] ʼ;
    public final int ˊ;
    public final long[] ˋ;
    public final Track ˎ;
    public final int[] ˏ;
    public final int ॱ;
    public final long ᐝ;

    public afi(Track track, long[] jArr, int[] iArr, int i, long[] jArr2, int[] iArr2, long j) {
        boolean z;
        boolean z2 = true;
        amm.ˊ(iArr.length == jArr2.length);
        if (jArr.length == jArr2.length) {
            z = true;
        } else {
            z = false;
        }
        amm.ˊ(z);
        if (iArr2.length != jArr2.length) {
            z2 = false;
        }
        amm.ˊ(z2);
        this.ˎ = track;
        this.ˋ = jArr;
        this.ˏ = iArr;
        this.ॱ = i;
        this.ʻ = jArr2;
        this.ʼ = iArr2;
        this.ᐝ = j;
        this.ˊ = jArr.length;
        if (iArr2.length > 0) {
            int length = iArr2.length - 1;
            iArr2[length] = iArr2[length] | 536870912;
        }
    }

    public int ˋ(long j) {
        for (int ˊ = anr.ˊ(this.ʻ, j, true, false); ˊ >= 0; ˊ--) {
            if ((this.ʼ[ˊ] & 1) != 0) {
                return ˊ;
            }
        }
        return -1;
    }

    public int ˏ(long j) {
        for (int ॱ = anr.ॱ(this.ʻ, j, true, false); ॱ < this.ʻ.length; ॱ++) {
            if ((this.ʼ[ॱ] & 1) != 0) {
                return ॱ;
            }
        }
        return -1;
    }
}
